package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendShiftAddDTO;
import org.jsola.hr.dto.AttendShiftUpdateDTO;
import org.jsola.hr.query.AttendShiftQuery;
import org.jsola.hr.vo.AttendShiftListVO;
import org.jsola.hr.vo.AttendShiftVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-考勤班次")
public interface IAttendShiftControllerAPI {

    /**
     * 新增考勤班次
     * @param attendShiftAddDTO 考勤班次新增实体
     * @return 考勤班次展示对象
     */
    @ApiOperation(value = "新增考勤班次")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftAddDTO", dataType = "AttendShiftAddDTO", value = "新增考勤班次", paramType = "body")
    })
    Result<AttendShiftVO> save(AttendShiftAddDTO attendShiftAddDTO);


    /**
     * 修改考勤班次
     * @param attendShiftUpdateDTO 考勤班次
     * @return 更新数量
     */
    @ApiOperation(value = "修改考勤班次")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftUpdateDTO", dataType = "AttendShiftUpdateDTO", value = "修改考勤班次", paramType = "body")
    })
    Result<Integer> update(AttendShiftUpdateDTO attendShiftUpdateDTO);




    /**
     * 删除单个考勤班次，彻底删除
     * @param attendShiftId 考勤班次id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个考勤班次，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftId", dataType = "String", value = "考勤班次id", paramType = "path")
    })
    Result<Integer> delete(String attendShiftId);


    /**
     * 批量删除考勤班次，彻底删除
     * @param attendShiftIds 考勤班次id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除考勤班次，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftIds", dataType = "String[]", value = "考勤班次id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendShiftIds);


    /**
     * 根据考勤班次id查询考勤班次详情
     * @param attendShiftId 考勤班次id
     * @return 考勤班次详情
     */
    @ApiOperation(value="根据考勤班次id查询考勤班次详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftId", dataType = "String", value = "考勤班次id", paramType = "path")
    })
    Result<AttendShiftVO> findById(String attendShiftId);


    /**
     * 查询考勤班次
     * @param attendShiftQuery 考勤班次查询参数
     * @return page
     */
    @ApiOperation(value="查询考勤班次")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftQuery", dataType = "AttendShiftQuery", value = "考勤班次查询参数", paramType = "query")
    })
    Result<List<AttendShiftListVO>> listAll(AttendShiftQuery attendShiftQuery);


     /**
     * 分页查询考勤班次
     * @param attendShiftQuery 考勤班次查询参数
     * @return page
     */
    @ApiOperation(value="分页查询考勤班次")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftQuery", dataType = "AttendShiftQuery", value = "考勤班次查询参数", paramType = "query")
    })
    Result<Page<AttendShiftListVO>> page(AttendShiftQuery attendShiftQuery);


}

